<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: CANopen</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__CO__CANopen.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">CANopen</div>  </div>
</div><!--header-->
<div class="contents">

<p>CANopenNode is free and open source implementation of CANopen communication protocol.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__CO__NO__OBJ"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NO__OBJ.html">CANopen configuration</a></td></tr>
<tr class="memdesc:group__CO__NO__OBJ"><td class="mdescLeft">&#160;</td><td class="mdescRight">Definitions specify, which and how many CANopenNode communication objects will be used in current configuration. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CANopen_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CANopen_8h.html">CANopen.h</a></td></tr>
<tr class="memdesc:CANopen_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main CANopenNode file. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__t.html">CO_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen object with pointers to all CANopenNode objects.  <a href="structCO__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaadb1d01f45937f04dc1a852fb0858735"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#gaadb1d01f45937f04dc1a852fb0858735">CO_new</a> (<a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *heapMemoryUsed)</td></tr>
<tr class="memdesc:gaadb1d01f45937f04dc1a852fb0858735"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate and initialize memory for CANopen object.  <a href="#gaadb1d01f45937f04dc1a852fb0858735">More...</a><br /></td></tr>
<tr class="separator:gaadb1d01f45937f04dc1a852fb0858735"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacdcafe5027a800ab14c5d32a8fa97cfb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#gacdcafe5027a800ab14c5d32a8fa97cfb">CO_delete</a> (void *CANptr)</td></tr>
<tr class="memdesc:gacdcafe5027a800ab14c5d32a8fa97cfb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete CANopen object and free memory.  <a href="#gacdcafe5027a800ab14c5d32a8fa97cfb">More...</a><br /></td></tr>
<tr class="separator:gacdcafe5027a800ab14c5d32a8fa97cfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab33aa7899db750f1840ba64674f5fb5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#gab33aa7899db750f1840ba64674f5fb5e">CO_CANinit</a> (void *CANptr, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> bitRate)</td></tr>
<tr class="memdesc:gab33aa7899db750f1840ba64674f5fb5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize CAN driver.  <a href="#gab33aa7899db750f1840ba64674f5fb5e">More...</a><br /></td></tr>
<tr class="separator:gab33aa7899db750f1840ba64674f5fb5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3de87df54415e3c5c824eceff677f4a4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#ga3de87df54415e3c5c824eceff677f4a4">CO_LSSinit</a> (<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *pendingNodeID, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> *pendingBitRate)</td></tr>
<tr class="memdesc:ga3de87df54415e3c5c824eceff677f4a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize CANopen LSS slave.  <a href="#ga3de87df54415e3c5c824eceff677f4a4">More...</a><br /></td></tr>
<tr class="separator:ga3de87df54415e3c5c824eceff677f4a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad85587d228b8ab0899a90c73ec0c7d9b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#gad85587d228b8ab0899a90c73ec0c7d9b">CO_CANopenInit</a> (<a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId)</td></tr>
<tr class="memdesc:gad85587d228b8ab0899a90c73ec0c7d9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize CANopenNode.  <a href="#gad85587d228b8ab0899a90c73ec0c7d9b">More...</a><br /></td></tr>
<tr class="separator:gad85587d228b8ab0899a90c73ec0c7d9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7a36da54b801074032622708e06a742e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__NMT__Heartbeat.html#gaf42f056a571b8e17a2d74428d1a49674">CO_NMT_reset_cmd_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#ga7a36da54b801074032622708e06a742e">CO_process</a> (<a class="el" href="structCO__t.html">CO_t</a> *co, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:ga7a36da54b801074032622708e06a742e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process CANopen objects.  <a href="#ga7a36da54b801074032622708e06a742e">More...</a><br /></td></tr>
<tr class="separator:ga7a36da54b801074032622708e06a742e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaad5c15c3ca475912661f512d37413b12"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#gaad5c15c3ca475912661f512d37413b12">CO_process_SYNC</a> (<a class="el" href="structCO__t.html">CO_t</a> *co, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:gaad5c15c3ca475912661f512d37413b12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process CANopen SYNC objects.  <a href="#gaad5c15c3ca475912661f512d37413b12">More...</a><br /></td></tr>
<tr class="separator:gaad5c15c3ca475912661f512d37413b12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4318848921c35e8bb5a7d97dca5668a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#ga4318848921c35e8bb5a7d97dca5668a0">CO_process_RPDO</a> (<a class="el" href="structCO__t.html">CO_t</a> *co, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> syncWas)</td></tr>
<tr class="memdesc:ga4318848921c35e8bb5a7d97dca5668a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process CANopen RPDO objects.  <a href="#ga4318848921c35e8bb5a7d97dca5668a0">More...</a><br /></td></tr>
<tr class="separator:ga4318848921c35e8bb5a7d97dca5668a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8c62a2afd2762d99e9c9be13a3d9a7a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#ga8c62a2afd2762d99e9c9be13a3d9a7a8">CO_process_TPDO</a> (<a class="el" href="structCO__t.html">CO_t</a> *co, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> syncWas, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:ga8c62a2afd2762d99e9c9be13a3d9a7a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process CANopen TPDO objects.  <a href="#ga8c62a2afd2762d99e9c9be13a3d9a7a8">More...</a><br /></td></tr>
<tr class="separator:ga8c62a2afd2762d99e9c9be13a3d9a7a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:gaa6b0e31a1f760af91bb742c83c00a6c1"><td class="memItemLeft" align="right" valign="top"><a id="gaa6b0e31a1f760af91bb742c83c00a6c1"></a>
<a class="el" href="structCO__t.html">CO_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen.html#gaa6b0e31a1f760af91bb742c83c00a6c1">CO</a></td></tr>
<tr class="memdesc:gaa6b0e31a1f760af91bb742c83c00a6c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen object. <br /></td></tr>
<tr class="separator:gaa6b0e31a1f760af91bb742c83c00a6c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopenNode is free and open source implementation of CANopen communication protocol. </p>
<p>CANopen is the internationally standardized (EN 50325-4) (CiA DS-301) CAN-based higher-layer protocol for embedded control system. For more information on CANopen see <a href="http://www.can-cia.org/">http://www.can-cia.org/</a></p>
<p>CANopenNode homepage is <a href="https://github.com/CANopenNode/CANopenNode">https://github.com/CANopenNode/CANopenNode</a></p>
<p><a class="el" href="CANopen_8h.html" title="Main CANopenNode file. ">CANopen.h</a> file combines Object dictionary (CO_OD) and all other CANopen source files. Configuration information are read from CO_OD.h file. CO_OD.h/.c files defines CANopen Object Dictionary and are generated by external tool. <a class="el" href="CANopen_8h.html" title="Main CANopenNode file. ">CANopen.h</a> file contains most common configuration of CANopenNode objects and can also be a template for custom, more complex configurations.</p>
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at</p>
<p><a href="https://www.apache.org/licenses/LICENSE-2.0">https://www.apache.org/licenses/LICENSE-2.0</a></p>
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gab33aa7899db750f1840ba64674f5fb5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab33aa7899db750f1840ba64674f5fb5e">&#9670;&nbsp;</a></span>CO_CANinit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_CANinit </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CANptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>bitRate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize CAN driver. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANptr</td><td>Pointer to the user-defined CAN base structure, passed to <a class="el" href="group__CO__driver.html#ga3a1131813110529494cee5e27c0bf28d" title="Initialize CAN module object. ">CO_CANmodule_init()</a>. </td></tr>
    <tr><td class="paramname">bitRate</td><td>CAN bit rate. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions. ">CO_ReturnError_t</a>: CO_ERROR_NO, CO_ERROR_ILLEGAL_ARGUMENT, CO_ERROR_ILLEGAL_BAUDRATE, CO_ERROR_OUT_OF_MEMORY </dd></dl>

</div>
</div>
<a id="gad85587d228b8ab0899a90c73ec0c7d9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad85587d228b8ab0899a90c73ec0c7d9b">&#9670;&nbsp;</a></span>CO_CANopenInit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_CANopenInit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize CANopenNode. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nodeId</td><td>CANopen Node ID (1 ... 127) or 0xFF(unconfigured). In the CANopen initialization it is the same as pendingBitRate from <a class="el" href="group__CO__CANopen.html#ga3de87df54415e3c5c824eceff677f4a4" title="Initialize CANopen LSS slave. ">CO_LSSinit()</a>. If it is unconfigured, then some CANopen objects will not be initialized nor processed. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions. ">CO_ReturnError_t</a>: CO_ERROR_NO, CO_ERROR_ILLEGAL_ARGUMENT </dd></dl>

</div>
</div>
<a id="gacdcafe5027a800ab14c5d32a8fa97cfb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacdcafe5027a800ab14c5d32a8fa97cfb">&#9670;&nbsp;</a></span>CO_delete()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_delete </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CANptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Delete CANopen object and free memory. </p>
<p>Must be called at program exit.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANptr</td><td>Pointer to the user-defined CAN base structure, passed to <a class="el" href="group__CO__driver.html#ga3a1131813110529494cee5e27c0bf28d" title="Initialize CAN module object. ">CO_CANmodule_init()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3de87df54415e3c5c824eceff677f4a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3de87df54415e3c5c824eceff677f4a4">&#9670;&nbsp;</a></span>CO_LSSinit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_LSSinit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>pendingNodeID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> *&#160;</td>
          <td class="paramname"><em>pendingBitRate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize CANopen LSS slave. </p>
<p>Function must be called before CO_CANopenInit.</p>
<p>See <a class="el" href="group__CO__LSSslave.html#gac445bdc7af5920e798196b1c3a48cbe0" title="Initialize LSS object. ">CO_LSSslave_init()</a> for description of parameters.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pendingNodeID</td><td>Pending node ID or 0xFF(unconfigured) </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pendingBitRate</td><td>Pending bit rate of the CAN interface </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions. ">CO_ReturnError_t</a>: CO_ERROR_NO, CO_ERROR_ILLEGAL_ARGUMENT </dd></dl>

</div>
</div>
<a id="gaadb1d01f45937f04dc1a852fb0858735"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaadb1d01f45937f04dc1a852fb0858735">&#9670;&nbsp;</a></span>CO_new()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_new </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>heapMemoryUsed</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate and initialize memory for CANopen object. </p>
<p>Function must be called the first time, after program starts.</p>
<dl class="section remark"><dt>Remarks</dt><dd>With some microcontrollers it is necessary to specify Heap size within linker configuration.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">heapMemoryUsed</td><td>Information about heap memory used. Ignored if NULL.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions. ">CO_ReturnError_t</a>: CO_ERROR_NO, CO_ERROR_ILLEGAL_ARGUMENT, CO_ERROR_OUT_OF_MEMORY </dd></dl>

</div>
</div>
<a id="ga7a36da54b801074032622708e06a742e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7a36da54b801074032622708e06a742e">&#9670;&nbsp;</a></span>CO_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__NMT__Heartbeat.html#gaf42f056a571b8e17a2d74428d1a49674">CO_NMT_reset_cmd_t</a> CO_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__t.html">CO_t</a> *&#160;</td>
          <td class="paramname"><em>co</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process CANopen objects. </p>
<p>Function must be called cyclically. It processes all "asynchronous" CANopen objects.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">co</td><td>CANopen object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in microseconds. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - maximum delay time after this function should be called next time in [microseconds]. Value can be used for OS sleep time. Initial value must be set to maximum interval time. Output will be equal or lower to initial value. Calculation is based on various timers which expire in known time. Parameter should be used in combination with callbacks configured with CO_***_initCallbackPre() functions. Those callbacks should also trigger calling of <a class="el" href="group__CO__CANopen.html#ga7a36da54b801074032622708e06a742e" title="Process CANopen objects. ">CO_process()</a> function. Parameter is ignored if NULL. See also <a class="el" href="group__CO__STACK__CONFIG.html#gab55099df45bed12f182ef7c0c779dc14">CO_CONFIG_FLAG_CALLBACK_PRE</a> configuration macro.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__NMT__Heartbeat.html#gaf42f056a571b8e17a2d74428d1a49674" title="Return code for CO_NMT_process() that tells application code what to reset. ">CO_NMT_reset_cmd_t</a> from <a class="el" href="group__CO__NMT__Heartbeat.html#ga1fe239fe8212f8fe671bf9a355020531" title="Process received NMT and produce Heartbeat messages. ">CO_NMT_process()</a>. </dd></dl>

</div>
</div>
<a id="ga4318848921c35e8bb5a7d97dca5668a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4318848921c35e8bb5a7d97dca5668a0">&#9670;&nbsp;</a></span>CO_process_RPDO()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_process_RPDO </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__t.html">CO_t</a> *&#160;</td>
          <td class="paramname"><em>co</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>syncWas</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process CANopen RPDO objects. </p>
<p>Function must be called cyclically from real time thread with constant. interval (1ms typically). It processes receive PDO CANopen objects.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">co</td><td>CANopen object. </td></tr>
    <tr><td class="paramname">syncWas</td><td>True, if CANopen SYNC message was just received or transmitted. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaad5c15c3ca475912661f512d37413b12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaad5c15c3ca475912661f512d37413b12">&#9670;&nbsp;</a></span>CO_process_SYNC()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> CO_process_SYNC </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__t.html">CO_t</a> *&#160;</td>
          <td class="paramname"><em>co</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process CANopen SYNC objects. </p>
<p>Function must be called cyclically from real time thread with constant interval (1ms typically). It processes SYNC CANopen objects.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">co</td><td>CANopen object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in microseconds. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see <a class="el" href="group__CO__CANopen.html#ga7a36da54b801074032622708e06a742e" title="Process CANopen objects. ">CO_process()</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True, if CANopen SYNC message was just received or transmitted. </dd></dl>

</div>
</div>
<a id="ga8c62a2afd2762d99e9c9be13a3d9a7a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8c62a2afd2762d99e9c9be13a3d9a7a8">&#9670;&nbsp;</a></span>CO_process_TPDO()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_process_TPDO </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__t.html">CO_t</a> *&#160;</td>
          <td class="paramname"><em>co</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>syncWas</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process CANopen TPDO objects. </p>
<p>Function must be called cyclically from real time thread with constant. interval (1ms typically). It processes transmit PDO CANopen objects.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">co</td><td>CANopen object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">syncWas</td><td>True, if CANopen SYNC message was just received or transmitted. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in microseconds. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see <a class="el" href="group__CO__CANopen.html#ga7a36da54b801074032622708e06a742e" title="Process CANopen objects. ">CO_process()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Jun 9 2020 17:29:32 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
